<template>
  <div id="detail">
    <h3>转载信息</h3>
    <el-table
            :data="reprintData"
            style="width:100%"
            border
    >
      <el-table-column
              prop="sender"
              label="sender"
              align="center"
      >
      </el-table-column>
      <el-table-column
              prop="receiver"
              label="receiver"
              align="center"
      >
      </el-table-column>
      <el-table-column
              prop="amount"
              label="amount"
              align="center"
      >
      </el-table-column>
    </el-table>

    <h3>侵权信息</h3>
    <el-table
            :data="infringement"
            style="width:100%"
            border
    >
      <el-table-column
              prop="id"
              label="侵权者"
              align="center"
      >
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    name: "Detail",
    data(){
      return{
        imgHash : "",
        reprintData:[],
        infringement:[]
      }
    },
    created() {
      this.imgHash = this.$route.query.imgHash

    //  获取图片转载者信息
      this.$http.get('/api/getImgReprinterList?imghash='+this.imgHash)
          .then(res => {
            let result = res.data.data
            for(let per of result)
            {
              let perData = {}
              perData.amount = per.amount
              perData.sender = per.sender
              perData.receiver = per.receiver
              this.reprintData.push(perData)
            }
          })

    //  获取侵权者信息
      this.$http.get('/api//getImgIllegalList?imghash='+this.imgHash)
          .then(res => {
            let result =  res.data.data
            for(let per of result)
            {
              let perData = {}
              perData.id = per
              this.infringement.push(perData)
            }
          })
    }

  }
</script>

<style scoped>

</style>